<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.EditCarpoolTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.EditCarpoolLabel_zona}" for="zona" />
                    <h:inputText id="zona" value="#{carpoolController.selected.zona}" title="#{bundle.EditCarpoolTitle_zona}" required="true" requiredMessage="#{bundle.EditCarpoolRequiredMessage_zona}"/>
                    <h:outputLabel value="#{bundle.EditCarpoolLabel_interes}" for="interes" />
                    <h:inputTextarea rows="4" cols="30" id="interes" value="#{carpoolController.selected.interes}" title="#{bundle.EditCarpoolTitle_interes}" />
                    <h:outputLabel value="#{bundle.EditCarpoolLabel_dia}" for="dia" />
                    <h:inputText id="dia" value="#{carpoolController.selected.dia}" title="#{bundle.EditCarpoolTitle_dia}" required="true" requiredMessage="#{bundle.EditCarpoolRequiredMessage_dia}"/>
                    <h:outputLabel value="#{bundle.EditCarpoolLabel_horario}" for="horario" />
                    <h:inputText id="horario" value="#{carpoolController.selected.horario}" title="#{bundle.EditCarpoolTitle_horario}" required="true" requiredMessage="#{bundle.EditCarpoolRequiredMessage_horario}"/>
                    <h:outputLabel value="#{bundle.EditCarpoolLabel_costo}" for="costo" />
                    <h:inputText id="costo" value="#{carpoolController.selected.costo}" title="#{bundle.EditCarpoolTitle_costo}" required="true" requiredMessage="#{bundle.EditCarpoolRequiredMessage_costo}"/>
                    <h:outputLabel value="#{bundle.EditCarpoolLabel_email}" for="email" />
                    <h:inputText id="email" value="#{carpoolController.selected.email}" title="#{bundle.EditCarpoolTitle_email}" required="true" requiredMessage="#{bundle.EditCarpoolRequiredMessage_email}"/>
                    <h:outputLabel value="#{bundle.EditCarpoolLabel_maximo}" for="maximo" />
                    <h:inputText id="maximo" value="#{carpoolController.selected.maximo}" title="#{bundle.EditCarpoolTitle_maximo}" required="true" requiredMessage="#{bundle.EditCarpoolRequiredMessage_maximo}"/>
                </h:panelGrid>
                <h:commandLink action="#{carpoolController.update}" value="#{bundle.EditCarpoolSaveLink}"/>
                <br />
                <br />
                <h:link outcome="View" value="#{bundle.EditCarpoolViewLink}"/>
                <br />
                <h:commandLink action="#{carpoolController.prepareList}" value="#{bundle.EditCarpoolShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:link outcome="/index" value="#{bundle.EditCarpoolIndexLink}" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
